//
//  MsgCell.m
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/11/7.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import "MsgCell.h"

@interface MsgCell ()

/// viewModle
@property (nonatomic, readwrite, strong) MsgCellModel *viewModel;

/// IBOutlet
@property (weak, nonatomic) IBOutlet UILabel* titleLabel;
@property (weak, nonatomic) IBOutlet UILabel* contentLabel;
@property (weak, nonatomic) IBOutlet UILabel* timeLabel;

@end

@implementation MsgCell

- (void)awakeFromNib
{
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

#pragma mark - bind data
- (void)bindViewModel:(MsgCellModel *)viewModel
{
    self.viewModel = viewModel;
    
    @weakify(self);
    
    self.titleLabel.text = self.viewModel.title;
    self.contentLabel.text = self.viewModel.content;
    self.timeLabel.text = self.viewModel.time;
}

@end
